﻿namespace CodeContrib
{
	public static class ExpressionEvaluatorExtensions
	{
		public static object Evaluate(this string expression)
		{
			var evaluator = new ExpressionEvaluator();

			return evaluator.Evaluate(expression);
		}

		public static T Evaluate<T>(this string expression)
		{
			var evaluator = new ExpressionEvaluator();

			return (T)evaluator.Evaluate(expression);
		}
	}
}